home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5089 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: cs.vu.nl!sun4nl!xs4all!marketgraph!rvg
  2. From: rvg@marketgraph.xs4all.nl (Ruud van Gaal)
  3. Newsgroups: comp.os.msdos.programmer,comp.lang.c
  4. Subject: Re: open vs fopen?
  5. Message-ID: <2d3avbl60.alamito@marketgraph.xs4all.nl>
  6. Date: Wed, 7 Feb 96 21:58:45 CET
  7. References: <uEYFxc9nX8WX083yn@mbnet.mb.ca> <4f8bev$6tr@hermes.louisville.edu>
  8. Reply-To: rvg@marketgraph.xs4all.nl
  9. X-Newsreader: Alamito Mail and News Manager (V2.0.4 for Waffle) registered to MARKETGRAPH VISUAL AUTOMATION
  10.  
  11. In <4f8bev$6tr@hermes.louisville.edu> gclind01@starbase.spd.louisville.edu 
  12. (George C. Lindauer) wrote:
  13.  
  14. >natewild@mbnet.mb.ca (Nathan T. Wild) writes:
  15. >
  16. >>In C, why would one use open and DOS int handles rather than fopen and
  17. >>stdio file handles?
  18. >
  19. >The only reason I know of is UNIX portability.  Whenever I run across a
  20. >unix program that uses the old-style open instead of fopen I usually
  21. >end up rewriting it anyway though; I've had so many problems with
  22. >the unix-style stuff I just rather would deal with the ANSI style.
  23. >
  24. >David
  25. >>Is there some speed advantage or differnet functionality?
  26.  
  27. fopen() is mostly buffered, open() is, I believe, not. open() also gives some 
  28. extra possible flags for sharing options. I use fopen() without problems. 
  29. Besides, it's ANSI, and I program multiple programs and sometimes share 
  30. modules that I'd have to check and redesign when switching from fopen to the 
  31. local open command.
  32.  
  33. --
  34. Ruud van Gaal
  35. MarketGraph Visual Automation
  36. E-Mail                : rvg@marketgraph.xs4all.nl
  37. DoomShell 4.5 homepage: http://www.xs4all.nl/~jwkorver
  38. "...Works fascinates me. I could sit and watch it for hours..."
  39.  
  40.